//
//  Network.swift
//  Monujo
//
//  Created by user on 2024/1/3.
//
//

import Foundation
import SwiftData


@Model public class Network {
    var name: String
    var networkSymbol: String
    var nativeTokenSymbol: String
    var nativeTokenBalance: Decimal
    var height: Int64
    var natitiveTokenprice: Decimal
    var netWorth: Double
    var address: Address?
    
    @Relationship(deleteRule: .cascade, inverse: \Coin.network)
    var coinList: [Coin] = []

    init(name: String, networkSymbol: String, nativeTokenSymbol: String, nativeTokenBalance: Decimal, height: Int64, natitiveTokenprice: Decimal, netWorth: Double, address: Address, coinList: [Coin]) {
        self.name = name
        self.networkSymbol = networkSymbol
        self.nativeTokenSymbol = nativeTokenSymbol
        self.nativeTokenBalance = nativeTokenBalance
        self.height = height
        self.natitiveTokenprice = natitiveTokenprice
        self.netWorth = netWorth
        self.address = address
        self.coinList = coinList
    }
    
}
